#include "fire_monitor.h"
#include "../lcd/lcd.h"
#include "../button/button.h"
#include "../buzzer/buzzer.h"

uchar fire_monitoring_flag = 1;

void FireMonitoring(uchar flag)
{
	if(flag == 0) return;
	else if(flag == 1)
	{
		if(fire == 0)
		{
			Lcd1602ClearScreen();
			Lcd1602WriteString(1,1,"-!!!WARNING!!!- ");
			Lcd1602WriteString(2,1,"There is a fire ");
			/*
			while(!fire)
			{
				//buzzer = ~buzzer;
				//Delay(100);				
			}
			*/
			Buzzer(1);

			while(1)
			{
				if(HomeCheck() == 1)
				{
					Buzzer(0);
					return;
				}
			}	
			//Lcd1602ClearScreen();
		}
	}	
}